#pragma once

#ifdef WIN32
#include <windows.h>
#endif

#include <GL/glew.h>

#ifdef MACX_DEV
#include <gl.h>
#include <glu.h>
#else
#include <GL/gl.h>
#include <GL/glu.h>
#endif

#include <QString>
#include <QFile>

namespace PBVP {
	/// 
	class GLSLShader
	{
	public:
		GLSLShader(const QString& fname, GLenum type);

		virtual ~GLSLShader(void);

		bool isValid() const {
			return m_isValid;
		}

		GLuint shaderId() const {
			return m_shaderId;
		}

	private:
		bool loadShader(const QString& fname);	

		GLuint m_shaderId;
		/// The shader type: either GL_VERTEX_SHADER or GL_FRAGMENT_SHADER
		GLenum m_shaderType;
		bool m_isValid;
	};
}
